package com.springcloudalibaba;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @Author: TongRui乀
 * @Date: 2019-11-22 16:39
 * @description：
 */
@SpringBootApplication
@EnableDiscoveryClient
public class NacosDiscoveryConsumer {

    public static void main(String[] args) {
        SpringApplication.run(NacosDiscoveryConsumer.class);
    }


    @LoadBalanced
    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

}
